package inherit;

public class Animal {
    private String name;
    private int id;
 Animal(){}
    Animal(String name,int id)
    {
        this.name=name;
        this.id=id;
    }
    void eat(){
        System.out.println(name+"正在吃饭");
    }
    void sleep(){
        System.out.println(name+"正在睡觉");
    }
    void introduction(){
        System.out.println("大家好！我是"+id+"号"+name+"。");
    }
}


